namespace ScrumSprintMonitor.Modules.WorkItemMonitor.ViewModels
{
	#region #using Directives

	using System.Collections.ObjectModel;

	using Microsoft.Practices.ServiceLocation;

	using UI.Wpf.ViewModels;

	#endregion

	public abstract class SprintChartViewModelBase<T> : SprintViewModelBase,
	                                                    ISprintChartViewModel<T>
	{
		protected SprintChartViewModelBase(IServiceLocator serviceLocator)
			: base(serviceLocator, true)
		{
		}

		#region Private Fields

		private readonly ObservableCollection<T> sprintPieChartData = new ObservableCollection<T>();

		#endregion

		#region Implementation of ISprintChartViewModel<T>

		public abstract string Caption { get; }

		public ObservableCollection<T> PieChartData
		{
			get
			{
				GuardDisposed();

				EnsureConnected();

				return this.sprintPieChartData;
			}
		}

		#endregion
	}
}